package com.hzncc.flowable_diboot.entity;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.lang.Double;
import java.math.BigDecimal;
import jakarta.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;


import com.diboot.core.util.D;
import com.diboot.core.entity.BaseModel;
import com.diboot.core.entity.BaseEntity;
import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
* 线索 Entity 定义
* @author MyName
* @version 1.0
* @date 2024-06-14
* Copyright © MyCorp
*/

@TableName("mdl_clue")
@Getter @Setter @Accessors(chain = true)
public class Clue extends BaseModel {
    private static final long serialVersionUID = 1715111489138093032L;

    /**
     * 租户
     */
    @NotNull(message = "租户不能为空")
    @TableField()
    private String tenantId;

    /**
     * 线索名称
     */
    @Length(max=100, message="线索名称长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String name;

    /**
     * 线索来源
     */
    @TableField()
    private String source;

    /**
     * 联系方式
     */
    @Length(max=100, message="联系方式长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String contactWay;

    /**
     * 咨询内容
     */
    @Length(max=100, message="咨询内容长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String content;

    /**
     * 客户地区
     */
    @Length(max=100, message="客户地区长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String area;

    /**
     * 负责人
     */
    @TableField()
    private String uid;

    /**
     * 状态
     */
    @TableField()
    private String status;

    /**
     * 分配日期
     */
    @TableField()
    private LocalDateTime disDate;

    /**
     * 进入线索池倒计时
     */
    @TableField()
    private Long expirationTime;

    /**
     * 是否分配（0未分配 1 已分配）
     */
    @TableField()
    private Integer flag;

    /**
     * 关注人
     */
    @TableField(exist = false)
    private List<String> starUids;

    /**
     * 进入理由
     */
    @Length(max=500, message="进入理由长度应小于500")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String reason;

    /**
     * 客户id
     */
    @TableField()
    private String customerId;

    /**
     * 进入线索池天数
     */
    @TableField()
    private Long enterDays;

    /**
     * 进入时间
     */
    @TableField()
    private LocalDateTime enterTime;

    /**
     * 邮箱
     */
    @TableField
    private String email;

    /**
     * 线索来源时间
     */
    @TableField
    private LocalDateTime sourceTime;

    /**
     * 客户名称
     */
    @TableField
    private String customerName;
}